NOTE:
This circuit is designed for extremely low level voltages in the nano
and microvolt range. If your sensor outputs a voltage in the high
millivolt range or volt range you will need to change the gain of the
first stage op amp (LTC1052 with a gain set at 1000 as shown in this schematic) and adjust the code gain to low numbers such as
"GAIN = 1;" to start. Since the second op amp has a biased output of
2.5 volts with a zero volt input on pin 2, The code variable OFFSET will
need to be adjusted to calibrate your ADC reading
to agree with your sensor reading. In this schematic, the ADC sees 2.5
volts as the zero point (half way between zero and + 5 volts) and will
add your signal to 2.5 volts. So if your signal is + 0.3 volts, the ADC
output will be 2.5 + 0.3 or 2.8 volts. | By
setting the offset in the code to make the 2.5 volt ADC output read
zero, you would then read your 0.3 volt input as 0.3 output from the
ADC. The same is true of negative voltages up to -2.5 volts. Any
signal or sensor voltage greater than
± 2.5 volts
will simply read 5 volts or zero volts out of the ADC. The second op
amp is single ended and will go to its rails with input voltages
greater than
± 2.5 volts. The good news it that you will probably not damage the ADC with a
reasonable over voltage. Working Arduino code is below the schematic. |
CODE TO USE WITH THIS SCHEMATIC...
Copy the code between the page lines (below this line to the next line) and enter the code into a new Arduino program blank page. It is critical that the libraries are added to the program just as they appear in this sample code. This code does not supply the libraries, the "Linduino" libraries must be downloaded as the text below describes.
DK7FC
END CODE above this line